<div class="span11">
    <div class="well hero-unit">
      <h2>Welcome, <?php echo Yii::app()->user->name;?></h2>
      <p>Booking Management System </p>
      <!--<p><a class="btn btn-success btn-large" href="<?php ?>">Manage Assignment &raquo;</a></p>-->
    </div>
    <?php if(Yii::app()->user->role_id==ROLE_ADMIN || Yii::app()->user->role_id==ROLE_MANAGER ): ?>
<!--          <div class="row-fluid">
            <div class="span3">
              <h3>Total Booked</h3>
              <p><a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index'); ?>" class="badge badge-inverse"><?php echo count(Booked::model()->getAll()); ?></a></p>
            </div>
            <div class="span3">
              <h3>Pending Booked</h3>
              <p><a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_PENDING); ?>" class="badge badge-inverse"><?php echo count(Booked::model()->getAll(STATUS_PENDING)); ?></a></p>
            </div>
            <div class="span3">
              <h3>Deliver Booked</h3>
              <p><a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_DELIVER); ?>" class="badge badge-inverse"><?php echo count(Booked::model()->getAll(STATUS_DELIVER)); ?></a></p>
            </div>
            <div class="span3">
              <h3>Finish Booked</h3>
              <p><a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_FINISH); ?>" class="badge badge-inverse"><?php echo count(Booked::model()->getAll(STATUS_FINISH)); ?></a></p>
            </div>
            <div class="span3">
              <h3>Pending</h3>
			  <p><a href="users.html" class="badge badge-inverse">2</a></p>
            </div>
            <div class="span3">
              <h3>Roles</h3>
			  <p><a href="roles.html" class="badge badge-inverse">3</a></p>
            </div>
          </div-->

<!--New-->

<div class="row-fluid">
								<div class="span5">
									<div class="widget-box transparent">
										<div class="widget-header widget-header-flat">
											<h4 class="lighter">
												<i class="icon-star orange"></i>
												Booking Report
											</h4>

											<div class="widget-toolbar">
												<a href="#" data-action="collapse">
													<i class="icon-chevron-up"></i>
												</a>
											</div>
										</div>

										<div class="widget-body">
											<div class="widget-main no-padding">
												<table class="table table-bordered table-striped">
													<thead>
														<tr>
															<th>
																<i class="icon-caret-right blue"></i>
																Name
															</th>

															<th class="hidden-phone">
																<i class="icon-caret-right blue"></i>
																Quantity
															</th>
														</tr>
													</thead>

													<tbody>
                                                        <?php
                                                            $arr = array(
                                                                0=>'Total Booked',
                                                                1=>'Pending Booked',
                                                                2=>'Deliver Booked',
                                                                3=>'Finish Booked',
                                                            );
                                                            
                                                            for($i = 0; $i < 4; $i++){
                                                        ?>                                                        
														<tr>
															<td><?php echo $arr[$i] ?></td>

															<td class="hidden-phone">
                                                                <?php if ($i == 0) : ?>
                                                                    <a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index'); ?>" 
                                                                        <span class="label arrowed">
                                                                            <?php echo count(Booked::model()->getAll()); ?>                                                                        
                                                                        </span>
                                                                    </a>
                                                                <?php elseif ($i == 1) : ?>
                                                                    <a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_PENDING); ?>" 
                                                                        <span class="label label-important arrowed">
                                                                            <?php echo count(Booked::model()->getAll(STATUS_PENDING)); ?>
                                                                        </span>
                                                                    </a>
                                                                <?php elseif ($i == 2) : ?>
                                                                    <a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_DELIVER); ?>"                                                                     
                                                                        <span class="label label-info arrowed-right arrowed-in">
                                                                            <?php echo count(Booked::model()->getAll(STATUS_DELIVER)); ?>
                                                                        </span>
                                                                    </a>
                                                                <?php elseif ($i == 3) : ?>
                                                                    <a href="<?php echo Yii::app()->createAbsoluteUrl('bookingsystem/booked/index?status='.STATUS_FINISH); ?>"                                                                                                                                         
                                                                        <span class="label label-success arrowed-in arrowed-in-right">
                                                                            <?php echo count(Booked::model()->getAll(STATUS_FINISH)); ?>
                                                                        </span>
                                                                    </a>
                                                                <?php endif; ?>
															</td>
														</tr>
                                                        <?php
                                                            }
                                                        ?>
													</tbody>
												</table>
											</div><!--/widget-main-->
										</div><!--/widget-body-->
									</div><!--/widget-box-->
								</div>
    
          <?php endif; ?>
</div>
<style>
    /*.hero-unit{margin-top:100px;}*/
    p {
        margin: 10px 0 10px !important;
    }
    
    .row-fluid .span5 {
        width: 100% !important;
    }    
</style>